package cn.netjava.manageraction;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import cn.netjava.actioninterface.Action;
import cn.netjava.dao.ReviewDao;
import cn.netjava.pojo.Review;
/**
 * this action is use for dealing with manager review
 * @author Administrator
 *
 */
public class ManagerReviewAction implements Action{

	public String excute(HttpServletRequest request,
			HttpServletResponse response) {
		HttpSession session =request.getSession();
		
		/*to get all reviews from mysql*/
		ReviewDao rdao =ReviewDao.getReviewDao();
		List<Review> reviewList = rdao.getAllReviewFromSQL();
		session.setAttribute("allreview", reviewList);
		
		return "JSP/managerjsp/managerreview.jsp";
	}

}
